<include file="Public/header" title="查看用户" />
<include file="Public/sidebar" />



<!-- 内容开始 -->

<div class="col-sm-9 col-xm-9 col-md-10  content">
	<table class="table">
		<tr>
			<th>ID</th>
			<th>用户名</th>
			<th>邮箱</th>
			<th>上次登陆</th>
			<th>登陆IP</th>
			<th>所属组</th>
			<th>状态</th>
		</tr>
		<foreach name="result" item="v">
			<tr>
				<td>{$v.id}</td>
				<td>{$v.username}</td>
				<td>{$v.email}</td>
				<td>{$v.loginip}</td>
				<td>{$v.logintime|date="Y-m-d H:i:s",###}</td>
				<td>
					<if condition="$v['username'] == C('RBAC_SUPERADMIN')">
						超级管理员
					<else/>
						<foreach name="v.role" item="value">
						{$value['name']}({$value['remark']})
						</foreach>
					</if>
				</td>
				<td>
					<if condition="$v['status'] eq 0">
				 			正常 <a href="{:U('/__CONTROLLER__/lockUserHandle',array("username"=>$v['username']))}">锁定</a>
				 	<else/> <span style="color:red">锁定</span><a href="{:U('/__CONTROLLER__/unlockUserHandle',array("username"=>$v['username']))}"> 解锁</a>
				 	</if>
				</td>
			</tr>
		</foreach>
	</table>
	<div class="clearfix"></div>

	{$page}	
</div>
<!-- 内容结束 -->


<include file="Public/footer"  />
